package com.redepronik.negosys.seguridad.entity;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQuery;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;

/**
 * The persistent class for the rolmenu database table.
 * 
 */
@Entity
@Table(schema = "seguridad", name = "rolmenu")
@NamedQuery(name = "Rolmenu.findAll", query = "SELECT r FROM Rolmenu r")
public class Rolmenu implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	@SequenceGenerator(allocationSize = 1, name = "ROLMENU_ROLMENUID_GENERATOR", sequenceName = "SEGURIDAD.ROLMENU_ROLMENUID_SEQ")
	@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "ROLMENU_ROLMENUID_GENERATOR")
	@Column(unique = true, nullable = false)
	private Integer rolmenuid;

	// bi-directional many-to-one association to Menu
	@ManyToOne
	@JoinColumn(name = "menuid", nullable = false)
	private Menu menu;

	// bi-directional many-to-one association to Rol
	@ManyToOne
	@JoinColumn(name = "rolid", nullable = false)
	private Rol rol;

	public Rolmenu() {
	}

	public Menu getMenu() {
		return this.menu;
	}

	public Rol getRol() {
		return this.rol;
	}

	public Integer getRolmenuid() {
		return this.rolmenuid;
	}

	public void setMenu(Menu menu) {
		this.menu = menu;
	}

	public void setRol(Rol rol) {
		this.rol = rol;
	}

	public void setRolmenuid(Integer rolmenuid) {
		this.rolmenuid = rolmenuid;
	}

}